function onRequest(frmID, msgDiv,page,url)
{
	var newId = '';
	var checkID = null;
	var content = null;
	var error= document.getElementById(msgDiv);
	var frm= document.getElementById(frmID);
	//alert('asdasdas');
	$.ajax({
	   type: "POST",
	   url: url,
	   cache: false,
	   data: $("#"+frmID).serialize(),
	   success: function(msg){
			var pos=msg.indexOf('<!');
			var content=msg.substring(0,pos);
			if(content != ""){
				var obj = jQuery.parseJSON(content); 
				arr = obj.message;
		    }
			error.style.display = 'block';
			error.innerHTML = arr;
			if(obj.ID=='0')
				frm.reset();	
			
	   }
	});
	
	return false;
}


